*************************************************************
*Figure 1 - Party Votes as a Percent of all House Votes
*************************************************************

*See code "Code_Figure1" to generate the figure using the data "Figure1Data.dta"


*************************************************************
*Table 1 - Party Support Timing Effect Test
*************************************************************

*Set working directory
use "PartySupport_MASTER.dta"

set more off 

gen AbsNominate=abs(nominate_dim1)
gen VoteShare_lag=dv_lag if party_code==100
replace VoteShare_lag=100-dv_lag if party_code==200
gen presvote=dpres if party_code==100
replace presvote=100-dpres if party_code==200

egen distgroup=group(state_abbrev district_code)

*VOTETYPES
*Regular Passage Category
gen RegPass=1 if VoteType==11 | VoteType==12 | VoteType==14 | VoteType==30
replace RegPass=0 if RegPass==.
label var RegPass "Regular Passage Category, VoteType types 11, 12, 14, 30"
*Suspensions Category
gen Susp=1 if VoteType==15 | VoteType==16 | VoteType==33 | VoteType==68
replace Susp=0 if Susp==.
label var Susp "Suspension Category, VoteType types 15, 16, 33, 68"
*Other Passage Category
gen OtherPass= 1 if VoteType==1 | VoteType==13 | VoteType==17 | VoteType==18 | VoteType==19 | VoteType==31 | VoteType==32
replace OtherPass=0 if OtherPass==.
label var OtherPass "Other Passage Category, VoteType types 1, 13, 17, 18, 19, 31, 32"
*Amendments Category
gen Amend=1 if VoteType==21 | VoteType==22 | VoteType==23 | VoteType==24 | VoteType==25 | VoteType==26 | VoteType==27 | VoteType==28 | VoteType==29 | VoteType==80
replace Amend=0 if Amend==.
label var Amend "Amendments Category, VoteType types 21, 22, 23, 24, 25, 26, 27, 28, 29, 80"
*Procedural Partisan Category
gen ProPart=1 if VoteType==61 | VoteType==76 | VoteType==77 | VoteType==79 | VoteType==81 | VoteType==82 | VoteType==88 | VoteType==89 | VoteType==93 | VoteType==95 | VoteType==97 | VoteType==99
replace ProPart=0 if ProPart==.
label var ProPart "Procedural Partisan Category, VoteType types 61, 76, 77, 79, 81, 82, 88, 89, 93, 95, 97, 99"
*Miscellaneous Procedural Category
gen MiscPro=1 if RegPass==0 & Susp==0 & OtherPass==0 & Amend==0 & ProPart==0
replace MiscPro=0 if MiscPro==.
label var MiscPro "Miscellaneous Procedural Category, VoteType types: All others"

*MODELS:

*USING LINEAR CYCLE TREND
*Without Covariates (Column 1):
logit PartyUnityVote c.DaysToElection##c.Cycle DaysToElection2 DaysToElection3 if PresPartyUnity==1, vce(cluster distgroup)
*With Covariates (Column 2):
logit PartyUnityVote c.DaysToElection##c.Cycle DaysToElection2 DaysToElection3 presvote QualChall QualChall_lag Freshman InpartyMidterm PresApproval_In rdi_q3_In PartyOfPres PrimaryChall redist seniorit Retirement_Jacob AbsNominate VoteShare_lag RegPass Susp MiscPro Amend ProPart if PresPartyUnity==1, vce(cluster distgroup)

gen post1994elec=1 if Cycle>=21
replace post1994elec=0 if post1994elec==.

*USING POST-1994 ELECTION
*Without Covariates (Column 3):
logit PartyUnityVote c.DaysToElection##i.post1994elec DaysToElection2 DaysToElection3 if PresPartyUnity==1, vce(cluster distgroup)
*With Covariates (Column 4):
logit PartyUnityVote c.DaysToElection##i.post1994elec DaysToElection2 DaysToElection3 presvote QualChall QualChall_lag Freshman InpartyMidterm PresApproval_In rdi_q3_In PartyOfPres PrimaryChall redist seniorit Retirement_Jacob AbsNominate VoteShare_lag RegPass Susp MiscPro Amend ProPart if PresPartyUnity==1, vce(cluster distgroup)

clear


**********************************************************
*Figure 2 - Party Support Timing Effect Predictions
**********************************************************

*See code "Code_Figure2Predictions" to generate the predictions (datasets: "Figure2a_Preds_reshaped" and "Figure2b_Preds_reshaped")
*See code "Code_Figure2" to generate the figure


*******************************************************
*Table 2 - Interrupted Time Series Design
*******************************************************

use "PartySupport_MASTER.dta"

bysort icpsr: egen mincycle=min(Cycle)
bysort icpsr: egen maxcycle=max(Cycle)

set more off 

gen AbsNominate=abs(nominate_dim1)
gen VoteShare_lag=dv_lag if party_code==100
replace VoteShare_lag=100-dv_lag if party_code==200
gen presvote=dpres if party_code==100
replace presvote=100-dpres if party_code==200

egen distgroup=group(state_abbrev district_code)

*VOTETYPES
*Regular Passage Category
gen RegPass=1 if VoteType==11 | VoteType==12 | VoteType==14 | VoteType==30
replace RegPass=0 if RegPass==.
label var RegPass "Regular Passage Category, VoteType types 11, 12, 14, 30"
*Suspensions Category
gen Susp=1 if VoteType==15 | VoteType==16 | VoteType==33 | VoteType==68
replace Susp=0 if Susp==.
label var Susp "Suspension Category, VoteType types 15, 16, 33, 68"
*Other Passage Category
gen OtherPass= 1 if VoteType==1 | VoteType==13 | VoteType==17 | VoteType==18 | VoteType==19 | VoteType==31 | VoteType==32
replace OtherPass=0 if OtherPass==.
label var OtherPass "Other Passage Category, VoteType types 1, 13, 17, 18, 19, 31, 32"
*Amendments Category
gen Amend=1 if VoteType==21 | VoteType==22 | VoteType==23 | VoteType==24 | VoteType==25 | VoteType==26 | VoteType==27 | VoteType==28 | VoteType==29 | VoteType==80
replace Amend=0 if Amend==.
label var Amend "Amendments Category, VoteType types 21, 22, 23, 24, 25, 26, 27, 28, 29, 80"
*Procedural Partisan Category
gen ProPart=1 if VoteType==61 | VoteType==76 | VoteType==77 | VoteType==79 | VoteType==81 | VoteType==82 | VoteType==88 | VoteType==89 | VoteType==93 | VoteType==95 | VoteType==97 | VoteType==99
replace ProPart=0 if ProPart==.
label var ProPart "Procedural Partisan Category, VoteType types 61, 76, 77, 79, 81, 82, 88, 89, 93, 95, 97, 99"
*Miscellaneous Procedural Category
gen MiscPro=1 if RegPass==0 & Susp==0 & OtherPass==0 & Amend==0 & ProPart==0
replace MiscPro=0 if MiscPro==.
label var MiscPro "Miscellaneous Procedural Category, VoteType types: All others"

gen post1994elec=1 if Cycle>=21
replace post1994elec=0 if post1994elec==.

*Keep members who served in at least two Congresses before and after the 1994 elections (i.e., at least 102nd-105th)

gen keep=0
replace keep=1 if mincycle<=19 & maxcycle>=22

*CONTINUING MEMBER MODELS:

*Without Covariates (Column 1):
logit PartyUnityVote c.DaysToElection##c.post1994elec DaysToElection2 DaysToElection3 if PresPartyUnity==1 & keep==1, vce(cluster distgroup)
*With Covariates (Column 2):
logit PartyUnityVote c.DaysToElection##c.post1994elec DaysToElection2 DaysToElection3 presvote QualChall QualChall_lag Freshman InpartyMidterm PresApproval_In rdi_q3_In PartyOfPres PrimaryChall redist seniorit Retirement_Jacob AbsNominate VoteShare_lag RegPass Susp MiscPro Amend ProPart if PresPartyUnity==1 & keep==1, vce(cluster distgroup)

*REPLACEMENT MEMBER MODELS:

*Without Covariates (Column 3):
logit PartyUnityVote c.DaysToElection##i.post1994elec DaysToElection2 DaysToElection3 if PresPartyUnity==1 & Freshman==1, vce(cluster distgroup)
*With Covariates (Column 4):
logit PartyUnityVote c.DaysToElection##i.post1994elec DaysToElection2 DaysToElection3 presvote QualChall QualChall_lag InpartyMidterm PresApproval_In rdi_q3_In PartyOfPres PrimaryChall redist seniorit Retirement_Jacob AbsNominate VoteShare_lag RegPass Susp MiscPro Amend ProPart if PresPartyUnity==1 & Freshman==1, vce(cluster distgroup)

*EXITING MEMBER MODELS:

*Without Covariates (Column 5):
logit PartyUnityVote c.DaysToElection##i.post1994elec DaysToElection2 DaysToElection3 if PresPartyUnity==1 & Cycle>=19 & Cycle<=22 & keep==0, vce(cluster distgroup)
*With Covariates (Column 6):
logit PartyUnityVote c.DaysToElection##i.post1994elec DaysToElection2 DaysToElection3 presvote QualChall QualChall_lag Freshman InpartyMidterm PresApproval_In rdi_q3_In PartyOfPres PrimaryChall redist seniorit Retirement_Jacob AbsNominate VoteShare_lag RegPass Susp MiscPro Amend ProPart if PresPartyUnity==1 & Cycle>=19 & Cycle<=22 & keep==0, vce(cluster distgroup)

clear

*************************************************************
*Figure 3 - District-Level Electoral Dynamics
*************************************************************

*See code "Code_Figure3" to generate the figure using the data "Figure3Data.dta"


*************************************************************
*Figure 4 - Effect Sizes by Member Vulnerability
*************************************************************

*See code "Code_Figure4" to generate the figures using the data "Figure4aData.dta" and "Figure4bData.dta"
*See code "Code_Figure4Coefficients" to retrieve the coefficients appearing in the figures


***********************************************************************************************************
*Figure 5 - Simulating the Independent Contribution of Change in Member Vulnerability
***********************************************************************************************************

*See code "Code_Figure5Predictions" to generate the predictions (datasets: "Figure5a_Preds_reshaped" and "Figure5b_Preds_reshaped")
*See code "Code_Figure5" to generate the figure


**********************************************************************************************************
*Table 3 - Party Support Timing Effect Test, Accounting for Closeness of Majority Party Control of House
**********************************************************************************************************

*Set working directory
use "PartySupport_MASTER.dta"

set more off 

gen AbsNominate=abs(nominate_dim1)
gen VoteShare_lag=dv_lag if party_code==100
replace VoteShare_lag=100-dv_lag if party_code==200
gen presvote=dpres if party_code==100
replace presvote=100-dpres if party_code==200

egen distgroup=group(state_abbrev district_code)

*VOTETYPES
*Regular Passage Category
gen RegPass=1 if VoteType==11 | VoteType==12 | VoteType==14 | VoteType==30
replace RegPass=0 if RegPass==.
label var RegPass "Regular Passage Category, VoteType types 11, 12, 14, 30"
*Suspensions Category
gen Susp=1 if VoteType==15 | VoteType==16 | VoteType==33 | VoteType==68
replace Susp=0 if Susp==.
label var Susp "Suspension Category, VoteType types 15, 16, 33, 68"
*Other Passage Category
gen OtherPass= 1 if VoteType==1 | VoteType==13 | VoteType==17 | VoteType==18 | VoteType==19 | VoteType==31 | VoteType==32
replace OtherPass=0 if OtherPass==.
label var OtherPass "Other Passage Category, VoteType types 1, 13, 17, 18, 19, 31, 32"
*Amendments Category
gen Amend=1 if VoteType==21 | VoteType==22 | VoteType==23 | VoteType==24 | VoteType==25 | VoteType==26 | VoteType==27 | VoteType==28 | VoteType==29 | VoteType==80
replace Amend=0 if Amend==.
label var Amend "Amendments Category, VoteType types 21, 22, 23, 24, 25, 26, 27, 28, 29, 80"
*Procedural Partisan Category
gen ProPart=1 if VoteType==61 | VoteType==76 | VoteType==77 | VoteType==79 | VoteType==81 | VoteType==82 | VoteType==88 | VoteType==89 | VoteType==93 | VoteType==95 | VoteType==97 | VoteType==99
replace ProPart=0 if ProPart==.
label var ProPart "Procedural Partisan Category, VoteType types 61, 76, 77, 79, 81, 82, 88, 89, 93, 95, 97, 99"
*Miscellaneous Procedural Category
gen MiscPro=1 if RegPass==0 & Susp==0 & OtherPass==0 & Amend==0 & ProPart==0
replace MiscPro=0 if MiscPro==.
label var MiscPro "Miscellaneous Procedural Category, VoteType types: All others"

gen majsize=232 if congress==84
replace majsize=232 if congress==85
replace majsize=282 if congress==86
replace majsize=264 if congress==87
replace majsize=258 if congress==88
replace majsize=295 if congress==89
replace majsize=248 if congress==90
replace majsize=243 if congress==91
replace majsize=255 if congress==92
replace majsize=243 if congress==93
replace majsize=291 if congress==94
replace majsize=292 if congress==95
replace majsize=278 if congress==96
replace majsize=243 if congress==97
replace majsize=269 if congress==98
replace majsize=254 if congress==99
replace majsize=258 if congress==100
replace majsize=260 if congress==101
replace majsize=267 if congress==102
replace majsize=258 if congress==103
replace majsize=230 if congress==104
replace majsize=226 if congress==105
replace majsize=223 if congress==106
replace majsize=221 if congress==107
replace majsize=229 if congress==108
replace majsize=233 if congress==109
replace majsize=233 if congress==110
replace majsize=257 if congress==111
replace majsize=242 if congress==112
replace majsize=234 if congress==113
replace majsize=247 if congress==114
replace majsize=241 if congress==115

gen post1994elec=1 if Cycle>=21
replace post1994elec=0 if post1994elec==.

gen majcomfort=majsize-217
gen majdiscomfort=217-majsize
*rescale majdiscomfort to the unit interval such that 1 (a majority of 218) is maximum closeness and 0 corresponds to a majority of 78 (the maximum majority in this dataset).
*(max'-min')/(max-min)(v-min)+min'
gen majdiscomfort_Unit=1/(-1+78)*(majdiscomfort+78)

*Column 1
logit PartyUnityVote c.DaysToElection##c.majdiscomfort_Unit DaysToElection2 DaysToElection3 if PresPartyUnity==1, vce(cluster distgroup)
*Column 2
logit PartyUnityVote c.DaysToElection##c.majdiscomfort_Unit DaysToElection2 DaysToElection3 presvote QualChall QualChall_lag Freshman InpartyMidterm PresApproval_In rdi_q3_In PartyOfPres PrimaryChall redist seniorit Retirement_Jacob AbsNominate VoteShare_lag RegPass Susp MiscPro Amend ProPart if PresPartyUnity==1, vce(cluster distgroup)
*Column 3
logit PartyUnityVote c.DaysToElection##c.Cycle c.DaysToElection##c.majdiscomfort_Unit DaysToElection2 DaysToElection3 if PresPartyUnity==1, vce(cluster distgroup)
*Column 4 (after executing Column 3 code)
listcoef, std help
*Column 5
logit PartyUnityVote c.DaysToElection##c.Cycle c.DaysToElection##c.majdiscomfort_Unit DaysToElection2 DaysToElection3 presvote QualChall QualChall_lag Freshman InpartyMidterm PresApproval_In rdi_q3_In PartyOfPres PrimaryChall redist seniorit Retirement_Jacob AbsNominate VoteShare_lag RegPass Susp MiscPro Amend ProPart if PresPartyUnity==1, vce(cluster distgroup)
*Column 6 (after executing Column 5 code)
listcoef, std help
*Column 7
logit PartyUnityVote c.DaysToElection##i.post1994elec c.DaysToElection##c.majdiscomfort_Unit DaysToElection2 DaysToElection3 if PresPartyUnity==1, vce(cluster distgroup)
*Column 8 (after executing Column 7 code)
listcoef, std help
*Column 9 
logit PartyUnityVote c.DaysToElection##i.post1994elec c.DaysToElection##c.majdiscomfort_Unit DaysToElection2 DaysToElection3 presvote QualChall QualChall_lag Freshman InpartyMidterm PresApproval_In rdi_q3_In PartyOfPres PrimaryChall redist seniorit Retirement_Jacob AbsNominate VoteShare_lag RegPass Susp MiscPro Amend ProPart if PresPartyUnity==1, vce(cluster distgroup)
*Column 10 (after executing Column 9 code)
listcoef, std help

clear

**********************************************************************************************************
*Table 4 - Party Support Timing Effect Test, Subsetting by Majority and Minority Party Status
**********************************************************************************************************

*Set working directory
use "PartySupport_MASTER.dta"

set more off 

gen AbsNominate=abs(nominate_dim1)
gen VoteShare_lag=dv_lag if party_code==100
replace VoteShare_lag=100-dv_lag if party_code==200
gen presvote=dpres if party_code==100
replace presvote=100-dpres if party_code==200

egen distgroup=group(state_abbrev district_code)

*VOTETYPES
*Regular Passage Category
gen RegPass=1 if VoteType==11 | VoteType==12 | VoteType==14 | VoteType==30
replace RegPass=0 if RegPass==.
label var RegPass "Regular Passage Category, VoteType types 11, 12, 14, 30"
*Suspensions Category
gen Susp=1 if VoteType==15 | VoteType==16 | VoteType==33 | VoteType==68
replace Susp=0 if Susp==.
label var Susp "Suspension Category, VoteType types 15, 16, 33, 68"
*Other Passage Category
gen OtherPass= 1 if VoteType==1 | VoteType==13 | VoteType==17 | VoteType==18 | VoteType==19 | VoteType==31 | VoteType==32
replace OtherPass=0 if OtherPass==.
label var OtherPass "Other Passage Category, VoteType types 1, 13, 17, 18, 19, 31, 32"
*Amendments Category
gen Amend=1 if VoteType==21 | VoteType==22 | VoteType==23 | VoteType==24 | VoteType==25 | VoteType==26 | VoteType==27 | VoteType==28 | VoteType==29 | VoteType==80
replace Amend=0 if Amend==.
label var Amend "Amendments Category, VoteType types 21, 22, 23, 24, 25, 26, 27, 28, 29, 80"
*Procedural Partisan Category
gen ProPart=1 if VoteType==61 | VoteType==76 | VoteType==77 | VoteType==79 | VoteType==81 | VoteType==82 | VoteType==88 | VoteType==89 | VoteType==93 | VoteType==95 | VoteType==97 | VoteType==99
replace ProPart=0 if ProPart==.
label var ProPart "Procedural Partisan Category, VoteType types 61, 76, 77, 79, 81, 82, 88, 89, 93, 95, 97, 99"
*Miscellaneous Procedural Category
gen MiscPro=1 if RegPass==0 & Susp==0 & OtherPass==0 & Amend==0 & ProPart==0
replace MiscPro=0 if MiscPro==.
label var MiscPro "Miscellaneous Procedural Category, VoteType types: All others"

gen majority=0
replace majority=1 if congress==84 & party_code==100
replace majority=1 if congress==85 & party_code==100
replace majority=1 if congress==86 & party_code==100
replace majority=1 if congress==87 & party_code==100
replace majority=1 if congress==88 & party_code==100
replace majority=1 if congress==89 & party_code==100
replace majority=1 if congress==90 & party_code==100
replace majority=1 if congress==91 & party_code==100
replace majority=1 if congress==92 & party_code==100
replace majority=1 if congress==93 & party_code==100
replace majority=1 if congress==94 & party_code==100
replace majority=1 if congress==95 & party_code==100
replace majority=1 if congress==96 & party_code==100
replace majority=1 if congress==97 & party_code==100
replace majority=1 if congress==98 & party_code==100
replace majority=1 if congress==99 & party_code==100
replace majority=1 if congress==100 & party_code==100
replace majority=1 if congress==101 & party_code==100
replace majority=1 if congress==102 & party_code==100
replace majority=1 if congress==103 & party_code==100
replace majority=1 if congress==104 & party_code==200
replace majority=1 if congress==105 & party_code==200
replace majority=1 if congress==106 & party_code==200
replace majority=1 if congress==107 & party_code==200
replace majority=1 if congress==108 & party_code==200
replace majority=1 if congress==109 & party_code==200
replace majority=1 if congress==110 & party_code==100
replace majority=1 if congress==111 & party_code==100
replace majority=1 if congress==112 & party_code==200
replace majority=1 if congress==113 & party_code==200
replace majority=1 if congress==114 & party_code==200
replace majority=1 if congress==115 & party_code==200

gen post1994elec=1 if Cycle>=21
replace post1994elec=0 if post1994elec==.

*Minority Party Members
*Column 1
logit PartyUnityVote c.DaysToElection##c.Cycle DaysToElection2 DaysToElection3 if PresPartyUnity==1 & majority==0, vce(cluster distgroup)
*Column 2
logit PartyUnityVote c.DaysToElection##c.Cycle DaysToElection2 DaysToElection3 presvote QualChall QualChall_lag Freshman InpartyMidterm PresApproval_In rdi_q3_In PartyOfPres PrimaryChall redist seniorit Retirement_Jacob AbsNominate VoteShare_lag RegPass Susp MiscPro Amend ProPart if PresPartyUnity==1  & majority==0, vce(cluster distgroup)
*Column 3
logit PartyUnityVote c.DaysToElection##c.post1994elec DaysToElection2 DaysToElection3 if PresPartyUnity==1 & majority==0, vce(cluster distgroup)
*Column 4
logit PartyUnityVote c.DaysToElection##i.post1994elec DaysToElection2 DaysToElection3 presvote QualChall QualChall_lag Freshman InpartyMidterm PresApproval_In rdi_q3_In PartyOfPres PrimaryChall redist seniorit Retirement_Jacob AbsNominate VoteShare_lag RegPass Susp MiscPro Amend ProPart if PresPartyUnity==1 & majority==0, vce(cluster distgroup)

*Majority Party Members
*Column 5
logit PartyUnityVote c.DaysToElection##c.Cycle DaysToElection2 DaysToElection3 if PresPartyUnity==1 & majority==1, vce(cluster distgroup)
*Column 6
logit PartyUnityVote c.DaysToElection##c.Cycle DaysToElection2 DaysToElection3 presvote QualChall QualChall_lag Freshman InpartyMidterm PresApproval_In rdi_q3_In PartyOfPres PrimaryChall redist seniorit Retirement_Jacob AbsNominate VoteShare_lag RegPass Susp MiscPro Amend ProPart if PresPartyUnity==1  & majority==1, vce(cluster distgroup)
*Column 7
logit PartyUnityVote c.DaysToElection##c.post1994elec DaysToElection2 DaysToElection3 if PresPartyUnity==1 & majority==1, vce(cluster distgroup)
*Column 8
logit PartyUnityVote c.DaysToElection##i.post1994elec DaysToElection2 DaysToElection3 presvote QualChall QualChall_lag Freshman InpartyMidterm PresApproval_In rdi_q3_In PartyOfPres PrimaryChall redist seniorit Retirement_Jacob AbsNominate VoteShare_lag RegPass Susp MiscPro Amend ProPart if PresPartyUnity==1 & majority==1, vce(cluster distgroup)

clear


**********************************************************************************************************
*Table 5 - Divisive Vote Timing Effect Test
**********************************************************************************************************

use "VoteTiming_MASTER.dta"

gen DemPercYea=TotalDemYeas/TotalDemVotes
gen DemPercNay=TotalDemNays/TotalDemVotes
gen RepPercYea=TotalRepYeas/TotalRepVotes
gen RepPercNay=TotalRepNays/TotalRepVotes

gen HyperDivisive=0
replace HyperDivisive=1 if DemPercYea>=.9 & RepPercNay>=.9
replace HyperDivisive=1 if DemPercNay>=.9 & RepPercYea>=.9

*WITH DAYS TO ELECTION AS MEASURING OF TIMING

*USING LINEAR CYCLE TREND
*Column 1, Top:
logit PresPartyUnity c.DaysToElection##c.Cycle, robust
*Column 1, Bottom:
logit HyperDivisive c.DaysToElection##c.Cycle, robust 
*Column 2, Top
logit PresPartyUnity c.DaysToElection##c.Cycle RegPass Susp MiscPro Amend ProPart majtopicdum2-majtopicdum22, robust
*Column 2, Bottom
logit HyperDivisive c.DaysToElection##c.Cycle RegPass Susp MiscPro Amend ProPart, robust

gen post1994elec=1 if Cycle>=21
replace post1994elec=0 if post1994elec==.

*USING POST-1994 ELECTION
*Column 3, Top:
logit PresPartyUnity c.DaysToElection##i.post1994elec, robust
*Column 3, Bottom:
logit HyperDivisive  c.DaysToElection##i.post1994elec, robust
*Column 4, Top:
logit PresPartyUnity c.DaysToElection##i.post1994elec RegPass Susp MiscPro Amend ProPart majtopicdum2-majtopicdum22, robust
*Column 4, Bottom:
logit HyperDivisive c.DaysToElection##i.post1994elec RegPass Susp MiscPro Amend ProPart, robust

*WITH SESSION AS MEASURE OF TIMING

gen SecondSession=0
replace SecondSession=1 if VoteYear==1956 | VoteYear==1958 | VoteYear==1960 | VoteYear==1962 | VoteYear==1964 | VoteYear==1966 | VoteYear==1968 | VoteYear==1970 | VoteYear==1972 | VoteYear==1974 | VoteYear==1976 | VoteYear==1978 | VoteYear==1980 | VoteYear==1982 | VoteYear==1984 | VoteYear==1986 | VoteYear==1988 | VoteYear==1990 | VoteYear==1992 | VoteYear==1994 | VoteYear==1996 | VoteYear==1998 | VoteYear==2002 | VoteYear==2004 | VoteYear==2006 | VoteYear==2008 | VoteYear==2010 | VoteYear==2012 | VoteYear==2014 | VoteYear==2016 | VoteYear==2018 

*USING LINEAR CYCLE TREND
*Column 5, Top:
logit PresPartyUnity c.SecondSession##c.Cycle, robust
*Column 5, Bottom:
logit HyperDivisive c.SecondSession##c.Cycle, robust
*Column 6, Top:
logit PresPartyUnity c.SecondSession##c.Cycle RegPass Susp MiscPro Amend ProPart majtopicdum2-majtopicdum22, robust
*Column 6, Bottom:
logit HyperDivisive c.SecondSession##c.Cycle RegPass Susp MiscPro Amend ProPart, robust

*USING POST-1994 ELECTION
*Column 7, Top:
logit PresPartyUnity c.SecondSession##i.post1994elec, robust
*Column 7, Bottom:
logit HyperDivisive c.SecondSession##i.post1994elec, robust
*Column 8, Top:
logit PresPartyUnity c.SecondSession##i.post1994elec RegPass Susp MiscPro Amend ProPart majtopicdum2-majtopicdum22, robust
*Column 8, Bottom:
logit HyperDivisive c.SecondSession##i.post1994elec RegPass Susp MiscPro Amend ProPart, robust

clear


**********************************************************
*Figure 6 - Divisive Vote Timing Effect Predictions
**********************************************************

*See code "Code_Figure6abPredictions" to generate the predictions for Figure 6a & 6b (datasets: "Figure6a1_Preds_reshaped", "Figure6a2_Preds_reshaped", and "Figure6b_Preds_reshaped")
*See code "Code_Figure6ab" to generate the figure (NOTE: we cropped the bottom of Figure 6b to remove hatch marks appearing at bottom)

*See code "Code_Figure6cdPredictions" to generate the predictions for Figure 6c & 6d (datasets: "Figure6c1_Preds_reshaped", "Figure6c2_Preds_reshaped", "Figure6d1_Preds" and "Figure6d2_Preds")
*See code "Code_Figure6cd" to generate the figure (NOTE: we cropped the bottom of Figure 6d to remove hatch marks appearing at bottom)


***********************************************************************************************************
*Figures 7 & 8 - Appropriation Vote Counts
***********************************************************************************************************

*See code "Code_Figure78Datasets" to generate the datasets for the figures (datasets: "Figure7_AppropsCountsQ*" and "Figure78_Q*dataset")
*See code "Code_Figure78" to generate the figures
